package com.dyh.quickdemo.demos.beanReplace;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
@Author=Joey Wheeler
@Date=2021/1/7 13:12
*/
@RestController
@RequestMapping("/ControllerA")
public class ControllerA {
    @Autowired
    ServiceA serviceA;
//    @Autowired
//    ItfServiceA serviceA;
    /*必须要接口 否则报错 type不一样*/

    @GetMapping("/a")
    public String a(){
        return serviceA.a();
    }
}
